import http from "./http"
import {
  getHost
} from "../../global.config"
const baseURL = getHost() // 公共部分统一
// 微信静默code 登录
export function loginByCode(data) {
  return http(baseURL + '/points/login/loginByCode', "POST", data)
}
// 微信code绑定手机号
export function getPhoneByCode(data) {
  return http(baseURL + '/points/login/getPhoneByCode', "POST", data)
}
// 用户信息详情
export function userDetail() {
  return http(baseURL + '/points/user/getUserInfo', "GET")
}
// 查询用户总积分
export function recordsGetTotal(data) {
  return http(baseURL + '/points/records/getTotal', "GET", data)
}
// 积分记录列表分页
export function recordsPage(data) {
  return http(baseURL + '/points/records/page', "GET", data)
}
// 积分记录列表分页 -- 未登录
export function unLoginRecordsPage(data) {
  return http(baseURL + '/points/records/unLogin/page', "GET", data)
}
// 以获得积分记录列表分页
export function recordslist(data) {
  return http(baseURL + '/points/records/list', "GET", data)
}

// 更换等价物
export function recordsUpdateExchange(data) {
  return http(baseURL + '/points/records/updateExchange', "POST_J", data)
}
// 更换积分
export function updatePoints(data) {
  return http(baseURL + '/points/records/updatePoints', "POST", data)
}

// 身份实名认证
export function verificationRealauth(data) {
  return http(baseURL + '/worker/my/realauth', "POST_J", data)
}

// 用户信息更新
export function updateUserDetail(data) {
  return http(baseURL + '/worker/my/update', "POST_J", data)
}